<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta charset="UTF-8">
    <title>16 独立 tab 切换</title>
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <script src="../angular-1.5.8/angular.js"></script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">

<mytem class="col-md-3" ></mytem>
<mytem class="col-md-3" ></mytem>
<mytem class="col-md-3" ></mytem>

<script type="text/ng-template" id="tmp">
    <div class="panel panel-primary" ng-init="flag=true">
        <div class="panel-heading" ng-click="flag=!flag">Panel heading without title</div>
        <div class="panel-body" ng-show="flag">
            Panel content
        </div>
    </div>

</script>
<script>
    var app = angular.module("myApp", [])
    app.directive("mytem",function () {
        return {
            templateUrl:"tmp",
            scope:true
        }
    })
    app.controller("myCtrl",function ($scope) {

    })
</script>
</body>
</html>